package com.parcel;

/**
 * Created by zhuangqi on 2016/12/12.
 */
public class parcel2 {
    class Contents {
        private int i =11;
        public int value() {
            return i;
        }
    }
    class Destination {
        private String label;
        Destination(String whereTo) {
            label = whereTo;
        }
        String readLabel() {
            return label;
        }
    }
    public Destination to(String s) {
        return new Destination(s);
    }
    public Contents contents() {
        return new Contents();
    }
    public void ship(String dest) {
        Contents c = new Contents();
        Destination d = to(dest);
        System.out.println(d.readLabel());
    }

    public static void main(String[] args) {
        parcel2 p = new parcel2();
        p.ship("Tasmania");
        parcel2 q = new parcel2();
        parcel2.Contents c = q.contents();
        parcel2.Destination D = q.to("Borneo");
        System.out.println(D.readLabel());
    }
}
